From: Jonas Dreßler Date: Thu, 23 Jan 2020 18:09:50 +0000 (+0100) Subject: st/entry: Notify "text" prop on every change in the ClutterText X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~135 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c2956e8bd2de01de4fdfc6e8a8eb41ef2df91134;p=gnome-shell.git st/entry: Notify "text" prop on every change in the ClutterText Notifying the "text" property inside `st_entry_set_text()` misses all the text changes done by ClutterText itself, including those that happen on key-presses. Fix that by notifying that property inside the "notify::text" handler connected to the ClutterText. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/951 --- diff --git a/src/st/st-entry.c b/src/st/st-entry.c index ba3d1ca60..24fe7434c 100644 --- a/src/st/st-entry.c +++ b/src/st/st-entry.c @@ -542,6 +542,8 @@ clutter_text_changed_cb (GObject *object, /* Since the text changed, force a regen of the shadow texture */ cogl_clear_object (&priv->text_shadow_material); + + g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]); } static void @@ -1054,7 +1056,8 @@ st_entry_set_text (StEntry *entry, clutter_text_set_text (CLUTTER_TEXT (priv->entry), text); - g_object_notify_by_pspec (G_OBJECT (entry), props[PROP_TEXT]); + /* Note: PROP_TEXT will get notfied from our notify::text handler connected + * to priv->entry. */ } /**